#include "widget.h"
#include "ui_widget.h"

#include <QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QPushButton* btn1 = new QPushButton("yes", this);
    QPushButton* btn2 = new QPushButton("no", this);

    btn1->move(250,150);
    btn2->move(350,150);

    btn1->setToolTip("这是确定按钮");
    btn2->setToolTip("这是取消按钮");
    btn1->setToolTipDuration(3000);
    btn2->setToolTipDuration(3000);
}

Widget::~Widget()
{
    delete ui;
}

